//
//  ZCLiveBuildManager.h
//  ZCLiveSDK
//
//  Created by 彭军 on 2017/11/18.
//  Copyright © 2017年 Elvis. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

//分辨率
typedef enum{
    /*!
     *  640*480
     */
    ZCResolution_LOW,
    /*!
     *  1280*720
     */
    ZCResolution_HIGH
}ZCResolution;

/**
 关闭回调

 @param erroInfo 当有错误不能唤起时，erroInfo为错误信息，正常关闭为nil
 */
typedef void (^ZCCloseCompletion)(NSString *erroInfo);

/**
 连接回调

 @param code 0：连接失败   1：连接成功
 */
typedef void (^ZCConnectStatus)(NSString *code);


@interface ZCLiveBuildManager : NSObject
@property (nonatomic,strong,readonly)NSNumber *latitude;
@property (nonatomic,strong,readonly)NSNumber *longitude;
@property (nonatomic,copy,readonly)NSString *accountId;
@property (nonatomic,copy,readonly)NSString *info;
@property (nonatomic,copy)ZCConnectStatus connectBlock;

/**
   分辨率设置 在connectWithTarget之前调用
   default is ZCResolution_HIGH
 */
@property (nonatomic,assign)ZCResolution resolution;

+ (ZCLiveBuildManager *)sharedInstance;
/**
 唤起勘察连接视图
 五个参数必传
 @param target 装载勘察视图的VC
 @param phoneNum 手机号码
 @param cartId 车牌号
 @param longitude 经度
 @param latitude 纬度
 @param closeBlock 关闭回调函数
 */
-(void)connectWithTarget:(UIViewController *)target phoneNum:(NSString*)phoneNum cartId:(NSString *)cartId longitude:(NSNumber *)longitude latitude:(NSNumber *)latitude closeBlock:(ZCCloseCompletion)closeBlock;

-(void)connectWithTarget:(UIViewController *)target phoneNum:(NSString*)phoneNum cartId:(NSString *)cartId longitude:(NSNumber *)longitude latitude:(NSNumber *)latitude accountId:(NSString *)accountId info:(NSString *)info closeBlock:(ZCCloseCompletion)closeBlock;
@end
